double newton(double, int);